/**
 * Created by Administrator on 2017/2/27.
 */
var SideBar = require('../../src/complex/sideBar');

var Root = React.createClass({
    getInitialState: function () {
        return{
            sideBarItem:PageDM.sideBar.value
        }
    },
    componentDidMount: function(){
        UEventHub.emit("pageLoad","hello world!");
    },
    showAnswer: function(e){
        var obj = e.srcElement || e.target;
        if(obj.parentNode.nextSibling.style.display=='block'){
            obj.parentNode.className = 'panel-title';
            obj.parentNode.nextSibling.style.display = 'none';
        }else{
            obj.parentNode.className = 'panel-title show';
            obj.parentNode.nextSibling.style.display = 'block';
        }
    },
    render: function() {
        return (
            <div>
                <div className="mod-account container">
                    <div className="sub-nav">
                        <SideBar sideBarItem={this.state.sideBarItem}/>
                    </div>
                    <div className="account padding">
                        <div className="help-main">
                            <div className="mod-title title"><b></b>实名认证常见问题<b></b></div>
                            <div className="panel-problem">
                                <div className="panel-group">
                                    <div className="panel">
                                        <div className="panel-title"> <b className="iconfont icon-wh"></b> <a href="javascript:;" className="collapse" onClick={this.showAnswer}>在平台投资为什么要先进行实名认证？</a> <div className="angle"><span></span></div></div>
                                        <div className="panel-content">
                                            为保障投资人的资金安全，平台需要对投资用户进行实名认证。平台将对所有用户信息严格保密。
                                        </div>
                                    </div>
                                    <div className="panel">
                                        <div className="panel-title"> <b className="iconfont icon-wh"></b> <a href="javascript:;" className="collapse" onClick={this.showAnswer}>实名认证信息保存成功后，我是否可以更改证件号码？</a> <div className="angle"><span></span></div></div>
                                        <div className="panel-content">
                                            不可以。为了保障投资人的资金安全，一个账号实名认证成功后，不能再次进行修改。请您在认证过程中认真确认您的信息。
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div className="clear"></div>
                        </div>
                    </div>
                    <div className="clear"></div>
                </div>
            </div>
        )
    }
});
ReactDOM.render(<Root/>, document.getElementById('giraffe'));